package com.redoor.app.stake.basicdata.dao;

import com.redoor.app.stake.basicdata.model.BaseCharger;
import com.redoor.app.stake.basicdata.model.BaseChargerCriteria;
import com.redoor.app.stake.basicdata.model.serviceModel.BaseChargerServiceBean;
import com.redoornetwork.framework.mybatis.mapper.Mapper;
import com.yotouch.app.stake.model.Charger;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BaseChargerMapper extends Mapper<BaseCharger> {

    /**
     * 统计充电枪数量
     * @param criteria
     * @return
     */
    public int queryChargersTotal(BaseChargerCriteria criteria);

    /**
     *  根据参数查询充电枪列表
     * @param criteria
     * @return
     */
    public List<BaseChargerServiceBean> queryChargers(BaseChargerCriteria criteria);

    /**
     *  根据参数查询充电枪列表
     * @param criteria
     * @return
     */
    public List<BaseCharger> queryChargers_COUNT(BaseChargerCriteria criteria);

    /**
     * 根据主键uuid查询充电枪实体
     * @param uuid
     * @return
     */
    public BaseCharger getChargerByUuid(@Param(value = "uuid") String uuid);

    /**
     * 修改充电枪实体
     * @param charger
     * @return
     */
    public int updateCharger(BaseCharger charger);

    /**
     * 创建充电枪
     * @param charger
     * @return
     */
    public int insertCharger(BaseCharger charger);

    /**
     * 根据uuid删除充电枪，假删除
     * @param uuid
     * @return
     */
    public int deleteChargerByUuid(@Param(value = "uuid") String uuid);

    /**
     * 统计国网桩数量
     * @return
     */
    public int sgccTotalCount(BaseChargerCriteria criteria);

    /**
     * 根据桩信息获取枪列表
     * @param criteria
     * @return
     */
    public List<Charger> sgccCharger(BaseChargerCriteria criteria);

    /**
     * 获取充电枪数据
     * @param criteria
     * @return
     */
    public List<Charger> hsfChargers(BaseChargerCriteria criteria);

    /**
     * 获取充电枪数量
     * @param criteria
     * @return
     */
    public int hsfChargersCount(BaseChargerCriteria criteria);

}